import request from '@/utils/request'

// 获取图片
export function getImage(id: number | string) {
  return request({
    url: `/user/image/id/${id}`,
    method: 'get'
  })
}

// 上传图片
export function uploadImage(data: FormData, type: number | string) {
  return request({
    url: `/user/image/type/${type}`,
    method: 'post',
    headers: {
        'Content-Type': 'multipart/form-data'
    },
    data
  })
}